<?php
trait Log{
	public function save(){
		return __METHOD__;
	}
}
trait Comment{
	public function total(){
		return __METHOD__;
	}
}
class Site{
	public function total(){
		return __METHOD__;
	}
}
class Topic extends Site{
	use Log,Comment;
	// public function total2(){
	// 	return __METHOD__;	
	// }
}

$topic=new Topic();
echo $topic->save();
echo $topic->total();

//输出 Log::save Comment::total  
//trait 类的同名函数 优先级高于 继承类同名函数